package lionel.MyJMRI.MyTrain;

import java.util.Collections;
import java.util.SortedSet;
import java.util.TreeSet;

public class MyTrainsInstance {
	static org.apache.log4j.Category log = org.apache.log4j.Category.getInstance(MyTrainsInstance.class.getName());
	
	private static SortedSet<MyTrain> mTrains = null;

	public synchronized static SortedSet<MyTrain> getInstance()
	{
		if (mTrains == null)
		{
			mTrains = Collections.synchronizedSortedSet( new TreeSet<MyTrain>() );
		}
		return mTrains;
	}
}
